#include <stdio.h>
#include <string.h>

struct student
{
    char name[32];
    int age;
    char sex; 
    char phone[12];
    void (*p)();
};

void stu_study()
{
    printf("student study\n");


}

int main(int argc, const char *argv[])
{
    struct student stu1;
    struct student *p_stu1;
    p_stu1 = &stu1;
    

    stu1.age=10;
    strcpy(stu1.name,"huangsoupalu");
    stu1.sex = 'm';
    strcpy(stu1.phone,"114514");
    stu1.p = stu_study;

    printf("age = %d\n",stu1.age);
    printf("name = %s\n",stu1.name);
    printf("phone = %s\n",stu1.phone);
    printf("sex = %c\n",stu1.sex);

    stu1.p();
    p_stu1->p();
    return 0;



}
